#ifndef CUSTOMDIALOG_H
#define CUSTOMDIALOG_H

#include <QDialog>
#include <QPoint>
#include <QTimer>
#include <QLabel>
#include <QPainter>
#include <QWidget>
#include <QPixmap>
#include <QBitmap>


/**
 * @brief The CustomDialog class
 * 语音助手界面
 */


class CustomDialog : public QDialog {
    Q_OBJECT

public:
    CustomDialog(QWidget* parent = nullptr);
    void changeToText(QString text);
    void changeToImg();
    void audioToFunction(QString text);
    ~CustomDialog();

protected:
    void mousePressEvent(QMouseEvent *event) override;

    void mouseMoveEvent(QMouseEvent *event) override;

    void mouseDoubleClickEvent(QMouseEvent* event) override;

private slots:
    void changeImg();

signals:
    void call();
    void myStart();
    void myQuit();
    void changeTheme();
    void chooseM();
    void chooseG();
    void chooseP();
    void chooseB();
    void chooseA();
    void startAudio();
    void stopAudio();
    void smallSizeFont();
    void mediumSizeFont();
    void bigSizeFont();
    void rememberSettings();
    void recoverSettings();
    void showText();
    void hideText();
    void magnifier();
    void dMagnifier();
    void bigMagnifier();
    void smallMagnifier();
    void startAi();
    void stopAi();
    void changeMouse();

    void quitDialog();

private:
    void setupUI();
    QPoint lastMousePosition;
    QTimer *timer;
    bool showImage;
    QLabel* label2;
    QLabel* labelText;
};



#endif // CUSTOMDIALOG_H
